<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>test4</title>
	<script src="https://cdn.jsdelivr.net/npm/vue@2.5.13/dist/vue.js"></script>
</head>
<body>
	<div id="vue-app">
		<h1>数据的双向绑定 input / select / textarea</h1>

		<!--普通js方法-->
		<label>姓名：</label>
		<input ref="name" type="text" @keyup.enter="logName" class="lalala" />
		<span>{{name}}</span>
		<label>年龄：</label>
		<input ref="age" type="text" @keyup.enter="logAge" />
		<span>{{age}}</span>


		<br/>
		<!--vue指令-->
		<label>姓名：</label>
		<input type="text" v-model="name" />
		<span>{{name}}</span>
		<label>年龄：</label>
		<input type="text" v-model="age" />
		<span>{{age}}</span>
	</div>

	<script src="../resource/js/test4.js"></script>
</body>
</html>